package scala.basic

/**
 * Scala 类型案例
 */
object ScalaValueTransferTest {

  def main(args: Array[String]): Unit = {
    var double1 = 1 + 0.21;
    println(double1)

    var double2: Double = 2.2222;
    //    var double3:Int = double2;//报错
    println(double2)

    var char1: Byte = 44;
    //    var char2 : Char = char1; //报错
    println(char1)

    var n1: Byte = 66;
    var n2: Char = 22;

    //    var n3 = Short = n1+n2; //报错，结果是Int类型
    //    var n4 = Short = 10+20; //报错，byte，short，char他们三者可以计算，在计算时首先转换为int类型。
  }
}
